/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * FacebookTest.java
 *
 * Created on 7 mai 2013, 15:58:34
 */

package facebook;

import java.awt.event.ActionListener;

/**
 *
 * @author Aladdin
 */
public class FacebookTest_1 extends javax.swing.JPanel {

    /** Creates new form FacebookTest */
    public FacebookTest_1() {
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel1 = new javax.swing.JPanel();
        login = new javax.swing.JButton();
        getPermissionsForApp = new javax.swing.JButton();
        retrieveUser = new javax.swing.JButton();
        getAccessToken = new javax.swing.JButton();

        login.setText("Login");

        getPermissionsForApp.setText("get permissions for app");

        retrieveUser.setText("retrieve user information");

        getAccessToken.setText("get access_token");

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGap(24, 24, 24)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(retrieveUser)
                        .addGap(63, 63, 63)
                        .addComponent(getAccessToken))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(login)
                        .addGap(54, 54, 54)
                        .addComponent(getPermissionsForApp)))
                .addContainerGap(109, Short.MAX_VALUE))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGap(26, 26, 26)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(login)
                    .addComponent(getPermissionsForApp))
                .addGap(42, 42, 42)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(retrieveUser)
                    .addComponent(getAccessToken))
                .addContainerGap(45, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(130, Short.MAX_VALUE))
        );
    }// </editor-fold>//GEN-END:initComponents


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton getAccessToken;
    private javax.swing.JButton getPermissionsForApp;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JButton login;
    private javax.swing.JButton retrieveUser;
    // End of variables declaration//GEN-END:variables

    public void setLoginListener(ActionListener l) {
  login.addActionListener(l);
 }
     public void setgetPermissionsForAppListener(ActionListener l) {
  getPermissionsForApp.addActionListener(l);
 }

 public void setretrieveUserListener(ActionListener l) {
  retrieveUser.addActionListener(l);
 }

 public void setgetAccessTokenListener(ActionListener l) {
  getAccessToken.addActionListener(l);
 }
}
